#pragma once

template<typename TLock>
class AutoLock
{
public:
	AutoLock(TLock& Lock) : m_Lock(Lock)
	{
		m_Lock.Lock();
	}

	~AutoLock()
	{
		m_Lock.Unlock();
	}

private:
	TLock& m_Lock;
};